<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/moban.css" type="text/css" rel="stylesheet"
	media="screen" />
<link href="../css/widget.css" type="text/css" rel="stylesheet"
	media="screen" />
<link href="../css/table.css" type="text/css" rel="stylesheet"
	media="screen" />
<link href="../managementOfMember/css/btn.css" type="text/css"
	rel="stylesheet" media="screen" />
<script type="text/javascript"
	src="../managementOfMember/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
	function check(i) {
		document.getElementById("checkcondition").value = i;
	}
	function showMsg() {
		var msg = '${message}';
		if (msg != null && msg != "") {
			alert(msg);
		}
	}
	function changeMajors() {
		document.getElementById("major").options.length = 0;
		var department = $("#department").val();

		$("#major").load("majorOptionsAction", {
			department : department
		});
	}
	function changeSrc(obj) {
		obj.src = "../img/return2.png";
	}
	function changeSrc2(obj) {
		obj.src = "../img/return.png";
	}
</script>
<title>修改团员信息</title>
</head>
<body onload="showMsg()">
<div style="background-color:#2E5E79;width:100%;height:50px;position:fixed;top:0;left:0;"></div>
<div id="package">
		<div id="hel">
			<div id="title">
				<span><img src="../managementOfMember/images/home.png" />&nbsp;修改信息</span> 
				<span id="right" style="margin-right:100px;">
				<img src="../img/return.png" onMouseOver="changeSrc(this)"
				onMouseOut="changeSrc2(this)" onclick="window.history.go(-1)" >
				</span>
			</div>
		</div>
		<div id="content" style="padding-bottom: 50px;">
			<form action="editimportStudentInfoByHand.action" method="post">
				<s:iterator value="#session.stages" var="stage">
					<s:if
						test="#stage.id > 0 && #stage.id <= member.getValue('process')">
						<table>
							<tr>
								<th><b style="font-size: 24px;"><s:property
											value="#stage.name" />阶段</b></th>
							</tr>

							<s:iterator value="#session.fields" var="field">
								<s:if test="#field.stage == #stage.id">
									<s:if test="#field.name != 'age'">
										<tr style="height: 40px">
											<td><s:property value="#field.chinese" />：</td>
											<td><s:if test="#field.name == 'sex'">
													<s:if test='member.getValue("sex") == "男" '>
														<input name="sex" type="radio" value="男" checked />男
							    								<input name="sex" type="radio" value="女" />女
															</s:if>
													<s:else>
														<input name="sex" type="radio" value="男" />男
							    								<input name="sex" type="radio" value="女" checked />女
															</s:else>
												</s:if> <s:elseif test="#field.name == 'department'">
													<select name="department" id="department"
														onchange="changeMajors()">
														<s:if test="#session.master.departmentid == 0">
															<option value="请选择">请选择</option>
															<s:iterator value="#request.departments" var="department">
																<s:if
																	test='#department.getName() == member.getValue("department")'>
																	<option
																		value="<s:property value="#department.getName()"/>"
																		selected="selected"><s:property
																			value="#department.getName()" /></option>
																</s:if>
																<s:else>
																	<option
																		value="<s:property value="#department.getName()"/>"><s:property
																			value="#department.getName()" /></option>
																</s:else>
															</s:iterator>
														</s:if>
														<s:else>
															<s:iterator value="#request.departments" var="department">
																<s:if
																	test="%{#session.master.departmentid == #department.id}">
																	<option
																		value="<s:property value="#department.getName()"/>"><s:property
																			value="#department.getName()" /></option>
																</s:if>
															</s:iterator>
														</s:else>
													</select>
												</s:elseif> <s:elseif test="#field.name == 'major'">
													<select name="major" id="major">
														<option>请选择</option>
														<s:iterator value="#request.majors" var="major">
															<s:if test='member.getValue("major") == #major.getName()'>
																<option value="<s:property value="#major.getName()"/>"
																	selected="selected"><s:property
																		value="#major.getName()" /></option>
															</s:if>
															<s:else>
																<option value="<s:property value="#major.getName()"/>"><s:property
																		value="#major.getName()" /></option>
															</s:else>
														</s:iterator>
													</select>
												</s:elseif> <s:elseif
													test="#field.name == 'birthday' || #field.name == 'jointime' || #field.name == 'gradetime'">
													<s:if test="#field.name == 'birthday'">
														<input class="Wdate" type="text" onClick="WdatePicker()"
															name="<s:property value="#field.name"/>"
															value="<s:property value="member.getValue('birthday')"/>">
													</s:if>
													<s:elseif test="#field.name == 'jointime'">
														<input class="Wdate" type="text" onClick="WdatePicker()"
															name="<s:property value="#field.name"/>"
															value="<s:property value="member.getValue('jointime')"/>">
													</s:elseif>
													<s:else>
														<input class="Wdate" type="text" onClick="WdatePicker()"
															name="<s:property value="#field.name"/>"
															value="<s:property value="member.getValue('gradetime')"/>">
													</s:else>
												</s:elseif> <s:elseif test="#field.name == 'nationality'">
													<input type="text" name="nationality"
														value="<s:property value="member.getValue('nationality')"/>"
														class="in" />
												</s:elseif> <s:elseif
													test="#field.name == 'application' || #field.name == 'membercard'">
													<s:if test="#field.name == 'application'">
														<s:if test='member.getValue("application") == "有"'>
															<input name="<s:property value="#field.name"/>"
																type="radio" value="有" checked="checked" />有
										    						<input name="<s:property value="#field.name"/>"
																type="radio" value="无" />无
																</s:if>
														<s:else>
															<input name="<s:property value="#field.name"/>"
																type="radio" value="有" />有
										    						<input name="<s:property value="#field.name"/>"
																type="radio" value="无" checked="checked" />无
																</s:else>
													</s:if>
													<s:else>
														<s:if test='member.getValue("membercard") == "有"'>
															<input name="<s:property value="#field.name"/>"
																type="radio" value="有" checked="checked" />有
										    						<input name="<s:property value="#field.name"/>"
																type="radio" value="无" />无
																</s:if>
														<s:else>
															<input name="<s:property value="#field.name"/>"
																type="radio" value="有" />有
										    						<input name="<s:property value="#field.name"/>"
																type="radio" value="无" checked="checked" />无
																</s:else>
													</s:else>
												</s:elseif> <s:elseif test="#field.name == 'memberclass'">
													<select name="memberclass">
														<s:if test='member.getValue("memberclass") == "旷课"'>
															<option value="旷课" selected="selected">旷课</option>
															<option value="请假">请假</option>
															<option value="完成">完成</option>
															<option value="原学校完成">原学校完成</option>
														</s:if>
														<s:elseif test='member.getValue("memberclass") == "请假"'>
															<option value="旷课">旷课</option>
															<option value="请假" selected="selected">请假</option>
															<option value="完成">完成</option>
															<option value="原学校完成">原学校完成</option>
														</s:elseif>
														<s:elseif test='member.getValue("memberclass") == "完成"'>
															<option value="旷课">旷课</option>
															<option value="请假">请假</option>
															<option value="完成" selected="selected">完成</option>
															<option value="原学校完成">原学校完成</option>
														</s:elseif>
														<s:else>
															<option value="旷课">旷课</option>
															<option value="请假">请假</option>
															<option value="完成">完成</option>
															<option value="原学校完成" selected="selected">原学校完成</option>
														</s:else>
													</select>
												</s:elseif> <s:elseif test="#field.name == 'volunteer'">
													<select name="volunteer">
														<s:if test='member.getValue("volunteer") == "1次"'>
															<option value="1次" selected="selected">1次</option>
														</s:if>
														<s:else>
															<option value="1次">1次</option>
														</s:else>
														<s:if test='member.getValue("volunteer") == "2次"'>
															<option value="2次" selected="selected">2次</option>
														</s:if>
														<s:else>
															<option value="2次">2次</option>
														</s:else>
														<s:bean name="org.apache.struts2.util.Counter"
															id="counter">
															<s:param name="first" value="1" />
															<s:param name="last" value="7" />
															<s:iterator>
																<s:if
																	test='member.getValue("volunteer") == (current+1)+"次"'>
																	<option value="<s:property value="current+1"/>次（完成）"
																		selected="selected"><s:property
																			value="current+1" />次（完成）
																	</option>
																</s:if>
																<s:else>
																	<option value="<s:property value="current+1"/>次（完成）"><s:property
																			value="current+1" />次（完成）
																	</option>
																</s:else>
															</s:iterator>
														</s:bean>
														<s:if test='member.getValue("volunteer") == "原学校完成"'>
															<option value="原学校完成" selected="selected">原学校完成</option>
														</s:if>
														<s:else>
															<option value="原学校完成">原学校完成</option>
														</s:else>
													</select>
												</s:elseif> <s:elseif test="#field.name == 'grade'">
													<select name="grade">
														<s:if test='member.getValue("grade") == "通过"'>
															<option value="通过" selected="selected">通过</option>
															<option value="未通过">未通过</option>
															<option value="原学校通过">原学校通过</option>
														</s:if>
														<s:elseif test='member.getValue("grade") == "未通过"'>
															<option value="通过">通过</option>
															<option value="未通过" selected="selected">未通过</option>
															<option value="原学校通过">原学校通过</option>
														</s:elseif>
														<s:else>
															<option value="通过">通过</option>
															<option value="未通过">未通过</option>
															<option value="原学校通过" selected="selected">原学校通过</option>
														</s:else>
													</select>
												</s:elseif> <s:elseif test="#field.name == 'idcard'">
														<input type="text" readonly="readonly" name="<s:property value="#field.name"/>"
														class="in"
														value="<s:property value="member.getValue(#field.name)"/>" />(无法修改)
												</s:elseif>
												<s:else>
													<!-- 这边是针对文本框的默认值输出 -->
													<input type="text" name="<s:property value="#field.name"/>"
														class="in"
														value="<s:property value="member.getValue(#field.name)"/>" />
												</s:else></td>
										</tr>
									</s:if>
								</s:if>
							</s:iterator>
							</s:if>
							</s:iterator>
							<input type="text" id="id" name="id"
								value="<s:property value="id"/>" style="display: none;" />
							<input type="text" id="checkcondition" name="checkcondition"
								value="" style="display: none;" />
							<input type="text" name="process"
								value="<s:property value="process"/>" style="display: none;" />
							<input type="text" name="majorId"
								value="<s:property value="majorId"/>" style="display: none;" />
							<input type="text" name="majorName"
								value="<s:property value="majorName"/>" style="display: none;" />
							<input type="text" name="departmentId"
								value="<s:property value="departmentId"/>" style="display: none;" />
							<input type="text" name="departmentName"
								value="<s:property value="departmentName"/>" style="display: none;" />
							<input type="text" name="stageName"
								value="<s:property value="stageName"/>" style="display: none;" />
							<tr style="height: 40px;">
								<td style="text-align: center;"><input type="submit"
									value="提交" onclick="check(1)" class="className" /> <!-- <input type="submit" value="暂存" onclick="check(0)" class="className"/> -->
								</td>
								<td>&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置"
									class="className" /></td>
							</tr>
						</table>
			</form>
		</div>
	</div>
</body>
</html>